    JR2DRV.TXT -- UPLoaded 2/22/87 (rev.4/1/87)

    **** Adding a second drive to PCjr thru modification of controller ****
     (Excerpted from now defunct Home Computer Magazine, Vol. 4, #4, 9/84)

				      ###

				 !!!WARNING!!!
**\   This modification will void *any* warranty that may be left on your   /**
***\  machine--the WHOLE machine, I'd guess--not just the controller card! /***
****>	 But since the warranty was for one year, and since only about	  <****
***/   a dozen or so new jr's have been sold in the last year or so, it's  \***
**/ probably not even worth mentioning--but thought I would, "just in case!"\**

				      ###

      Modification consists of:
	      -"Piggybacking" of two additional chips, on top of existing ICs;
	      -Addition of seven jumpers to locations on controller;
	      -"Lifting" or cutting of two pins on existing ICs;
	      -Changing position of selection jumper on internal drive;
	      -Making up a cable;
	      -Addition of a simple assembly language program, and installing
	       a special AUTOEXEC.BAT file on your boot disk.

      1.  Prepare and install the two chips as follows:
	      a.  74LS175--[a quad "D" flip flop with complementary outputs]:
		  bend up 90 degrees ALL pins *except* 1,4,8,9 & 16;
		  push on top of another 74LS175 (right end, 1st row, below
		  large controller chip & 555 timer), making sure pin 1 goes
		  over pin 1!  Solder the 5 pins not bent up to the same
		  pins of the original chip.  CAUTION!	DO NOT OVERHEAT!!

	      b.  7410 (NOT 74LS10 as article says)--[a triple 3-input NAND
		  gate]: bend up ALL pins *except* 7 and 14.  Push down over
		  the 74LS08 (the first chip to the left of the FDC chip, a
		  uPD765, in the top row), taking care to match the LS08 pins.
		  Solder the two pins to the bottom chip, as with the 1st IC.

     (NOBODY who is not fairly experienced at this type of work should attempt
     this conversion;  but I'll share my experience with you experienced folks
     anyway, just in case it can make things a tiny bit easier!)

      2.  a.  Using a pair of flush-cut diagonal cutters, cut pin 1 of the
	      MC3487--first chip, left end, second row of ICs (same row as
	      the '175)--as close to the board as possible.  Then bend the
	      just-cut pin up--we'll solder a wire to it later.  Just in case
	      you have a problem when finished and want to check the board with
	      a digital probe or something--this is a quad RS422 line driver
	      with 3-state outputs.  Pin 1 is an input, which is output on
	      pins 2 (non-inverted) and 3 (inverted).  Only pin 3 is used--
	      when it goes low, it accesses the drive (B:) ("drive enable").

	  b.  The other cut pin isn't so easy--it's pin 13 of the 74LS04, just
	      to the left of the '175.  There's a capacitor in the way.  Heat
	      the left lead on TOP of the board (it'll loosen easier that way),
	      and lift the capacitor up out of the way.  Clip pin 13 as close
	      to the board as possible --not so easy, be careful of pins 12 &
	      14!-- bend the pin up for another wire connection later, then
	      replace the capacitor.  This chip is a Schmitt-triggered hex
	      inverter.  Pin 13 is an input; the output is on pin 12.  This is
	      the "motor enable" line.  Both this and the "drive enable" line
	      were disconnected from the original circuitry, and will soon be
	      fed by the new circuitry you're about to install.

      3.  The JUMPERS--
	  For these tiny things I've found that heating the end of the wire
	  rather than trying to strip the insulation usually gives you enough
	  bare wire to make the connection.  Then, just touch the iron to the
	  pin first, to get a little solder on it.  Now all you have to hold
	  is the iron and the wire!  Lay the wire on the pin, and a second or
	  less of contact with the iron on the two should make a strong union.

	      The jumpers go...
		 [1]  FROM pin 2 of the '175...
		       ...TO pins 9,10 & 11 of the 7410
		      (here's one place where you may HAVE to *strip*!)
		 [2]  FROM pin 3 of the '175...
		       ...TO pin 3 of the 7410
		 [3]  FROM pin 5 of the '175...
		       ...TO pin 7 of the FCD chip  (the big one)
		 [4]  FROM pin 6 of the '175...
		       ...TO pins 4 & 5 of the 7410
		       (maybe another strip)
		 [5]  FROM pin 7 of the '175...
		       ...TO pin 1 of the MC3487
		       (left end-most chip, second row--same row as the '175)
		 [6]  FROM pin 13 of the 74LS04
			(immediately to the left of the '175, same row)...
		       ...TO pin 6 of the 7410
		 [7]  FROM pin 8 of the 7410...
		       ...TO pin 10 of 34-pin header where the cable connects)
			(these pins are numbered, top row: 1,3,5,etc.,
			 from the RIGHT to LEFT, looking at component side;
			 and bottom row: 2,4,6,etc. R-to-L).
		       NOTE:  This wire must be wrapped around the pin at least
			      once (one more strip job!), positioned as low as
			      possible to the plastic bottom and soldered with
			      the absolute MINIMUM amount of solder<!> (or the
			      plug won't sit right).

      4.  Now, check the little (blue?) jumper on the internal floppy drive's
	  board, just behind the edge connector finger contacts.  It should
	  be on DS1.  Move it to DS0.  On your soon-to-be-connected second
	  drive, the jumper should go on DS1, of course!

	  This *may* not be the same type of jumper--it may be part of a DIP
	  header or maybe even a DIP switch!  In this case, you'll have to
	  trace out the #12 edge connector finger (use a continuity meter) to
	  see which pin of the socket it goes to.  Pull the header, DIP switch,
	  or whatever's in the socket, first.  Then, jumper the pin that you
	  find connected to #12 to the pin exactly opposite on the socket. (In
	  my case, it was #3-to-#12.)  ALSO--this should be(*) the ONLY jumper
	  on the header--all others should be "broken," or disconnected.

	  (*) In special cases, it may be necessary to leave the other jumpers
	    connected--so before breaking the contacts, make a note of which
	    pins were connected.  If you have to put the jumpers back, just a
	    little daub of solder should do it;  OR, you can discard the
	    header and just put in short stripped wires across the socket.

      5.  All that's left (of hardware work) is making the cable.  You can
	  probably buy one to do the job, but it won't be as precise as you
	  can make it!	Take a strip of about four feet of 34-conductor ribbon
	  cable, and duplicate the IBM cable bends and folds on one end.  DO
	  NOT CUT THE CABLE SHORT.  You'll need a special edge card connector
	  that does NOT have a *higher* lip on the opposite side of where the
	  cable "enters" the connection slot, because the cable will go
	  "through" the connector on the internal drive.  (NOTE:  I've found
	  the way to get these connectors onto ribbon cable is to use a vice.)
	  After you get that part of the cable to fit right, put another fold-
	  UP-and-over-itself crease in the cable, TO THE RIGHT (toward where a
	  sidecar would attach)--you'll notice there's a notch in the case
	  that'll let it slip under the cover when you replace it (with a
	  insistence the first time).  Then put another edge connector (any ol'
	  kind) on the free end.  All you need now is the second drive and a
	  little program, which follows.

      Now we're going to have to tell DOS its got another drive to address.
      First, the following files MUST be on your boot disk:

			     COMMAND.COM
			     DEBUG.COM
			     DISKCOPY.COM

and a special AUTOEXEC.BAT file along with 3 other tiny files we're gonna make:

			     BOOT.BAT
			     MODBOOT.BAT
			     SWITCH.BAT

      You can make these files with a word processor, or with "copy con:".

      MODBOOT.BAT is a short ml routine that is NOT CORRECT in the original
article. It should be:

	     A 0:9080	    ;assemble following code at 0000:9080 (arbitrary)
	     XOR AX,AX	    ;zero the AX register
	     MOV DS,AX	    ;shift the zero into the DS address register
	     OR BY [410],40 ;load 40h into 0000:0410, changing the bits
	     NOP	    ;"no operation"; haven't the foggiest WHY<?>
			    ;(this blank line stops assembly)
	     G=0:9080 9089  ;run the [above] program
	     L 0:7C00 0 0 1 ;go back to the boot disk & load the boot record
	     G=0:7C00	    ;"run" [DO] the boot (boot starts over again)

      BOOT.BAT is a clever little deal that runs the MODBOOT ml routine by
loading it with DEBUG:
			   RENAME switch.bat config.sys
			   DEBUG<MODBOOT.BAT

      (Note that this is ALSO different from the article's suggestion.  More
on that in a moment.)

      The AUTOEXEC.BAT file is the key to the whole ball of wax.  Here's
the *minimum* (also more later), which must be FIRST in your AUTOEXEC file:

			   IF EXIST switch.bat GOTO first
			   GOTO last
			   :first
			   BOOT
			   :last
			   REN config.sys switch.bat

      The reason that works (if you're not familiar with these things, it looks
like it doesn't "follow" thru properly) is that the first statement executes,
goes to ":first", does BOOT.BAT, which calls MODBOOT.BAT, which tells DOS to
load the boot record as its last command:  G=0:7C00--which, in effect, starts
the boot process all over again (AFTER we've stuck our little code into :0410!)
So, the whole file executes *over again*--but this time, SWITCH.BAT's *gone*,
so it goes to the second statement, which immediately gets rid of CONFIG.SYS,
so that it doesn't reconfigure the system again and mess everything up!  It IS
kinda strange that it works, if you stop & think about it...but it DOES!

      Now, the WHY for the changes.  Originally, the SWITCH.BAT file (which
I realize I haven't mentioned yet) was just a dummy:

			   REM	dummy file

and the REN statements for SWITCH.BAT renamed it OFF.BAT.

      But many readers, myself included, discovered that after loading this,
we had no way to get PCJRMEM.COM, a RAMdisk or other things to load properly.
This was because, as DEVICE DRIVERS, they had to be in a CONFIG.SYS file.

      But if a CONFIG.SYS file is on your boot disk, THIS ROUTINE WILL NOT
WORK, because DOS always looks for that first, THEN the AUTOEXEC.BAT file.  But
we all (sort of all at once--about six of us wrote in at the same time!)
discovered the easy solution (easy for THEM--I had to experiment for a day or
two, as I recall!)...to get *rid* of CONFIG.SYS until we're through messin'
around!

      Instead of just having SWITCH.BAT as a dummy file, we made it a "dis-
guised" CONFIG.SYS file!  After the change back to SWITCH.BAT, you can put in
your "normal" configuration stuff like:

	      SET HOST=C2,B1200,E \A:\P.EXE,FS,P4,SS,H \A:\HOSTHE.EXE,D32;40
	      SETCLK
	      MODE CO80
	      MODE COM1:1200,N,8
	      MODE LPT1:=COM1
	      SWAPCO

      [ NOTE:  I am "assured" by J & M Systems, Ltd., which sells hard disk
drives for jr--for which you have the option of buying their PC2C Disk
Controller OR *modifying IBM's existing controller*--that the necessary
modification (a tie to +5v and a trace cut to the 34-pin connector) will NOT
interfere with this modification, and the controller should *still* run two (or
more*) floppy drives as well as their hard disk. ]

      [ NUTHER NOTE:  In case you're wondering what you should do in case
you're using a file, such as MEMDRV.SYS, that the vendor says *must* go first--
then I didn't write my explanation clearly, or you didn't read it, or under-
stand it!  Those special "run-first" files WILL run first--AFTER we've stuck
our little byte into the equipment word location.  As I said above, the boot
starts all over again.	I've found several second-disk drivers (such as QS's
for the jrHOTSHOT) that also work, so if you find one that does the job, you
won't have to have DEBUG or DISKCOPY on your boot disk! ]

      If you want to run *three* drives, that too can be done!	Check out the
file JR3DRV.TXT here!

      If you have any problems (or in case I've left something out), let me
know, & I'll try'n help!

      Have fun!

				       --George Peters	71330,200
